//
//  NSArray+HMArray.m
//  ZFBStoryboardForThink03
//
//  Created by mac on 16/7/14.
//  Copyright © 2016年 itheima. All rights reserved.
//

#import "NSArray+HMArray.h"
#import "NSObject+HMObj.h"

@implementation NSArray (HMArray)
+ (instancetype)hm_arrayWithURL:(NSURL *)url clasName:(NSString *)className
{
    NSArray *array = [NSArray arrayWithContentsOfURL:url];
    NSMutableArray *Marr = [NSMutableArray arrayWithCapacity:array.count];
    for (NSDictionary *dict in array)
    {
        NSObject *model = [NSObject hm_objWithClassName:className dict:dict];
        [Marr addObject:model];
    }
    return Marr.copy;
}
@end
